package com.neuedu.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neuedu.dao.CommentDao;
import com.neuedu.model.Admin;
import com.neuedu.model.Comment;
import com.neuedu.service.CommentService;

//配置一个spring的服务类，把业务实现类交给spring进行管理，把Spring完成依赖注入
@Service
public class CommentServiceImpl implements CommentService {

	// 织如入-依赖注入
	@Autowired
	private CommentDao commentDao;

	public void setCommentDao(CommentDao commentDao) {
		this.commentDao = commentDao;
	}

	@Override
	public int countComment() {
		// TODO 自动生成的方法存根
		return commentDao.countComment();
	}

	@Override
	public List<Comment> findAll(Map<String, Object> map) {
		// TODO 自动生成的方法存根
		return commentDao.findAll(map);
	}

	@Override
	public int updateComment(Comment c) {
		// TODO Auto-generated method stub
		return commentDao.updateComment(c);
	}
	
	@Override
	public int deleteComment(int id) {
		// TODO 自动生成的方法存根
		return commentDao.deleteComment(id);
	}

	@Override
	public List<Comment> findList() {
		// TODO 自动生成的方法存根
		return commentDao.findList();
	}
}
